package com.tbit.uqbike.object.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.tbit.uqbike.annos.Excel;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.Map;

/**
 * 用户特殊认证记录
 *
 * @Author:BUGTian
 * @DATE: 2022/9/23
 */
@Data
@Accessors(chain = true)
public class UserAuthLog {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer userAuthLogId;
    /**
     * 用户id
     */
    private Integer userId;
    /**
     * 用户名称
     */
    @Excel(name = "姓名", sort = 1)
    private String userName;
    /**
     * 手机号码
     */
    @Excel(name = "手机号", sort = 3)
    private String phone;
    /**
     * 区域id
     */
    private Integer adAccountId;
    /**
     * 配置id
     */
    private Integer configId;
    /**
     * 类型
     */
    private Integer type;
    /**
     * 证件号码
     */
    @Excel(name = "证件号码", sort = 5)
    private String authNo;
    /**
     * 照片地址
     */
    private String url;
    /**
     * 添加时间
     */
    @Excel(name = "申请时间", sort = 4, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date addTime;
    /**
     * 审核状态 0未处理、1审核成功、2审核失败
     */
    @Excel(name = "状态", sort = 6, readConverterExp = "0=未处理,1=审核成功,2=审核失败")
    private Integer state;
    /**
     * 审核时间
     */
    @Excel(name = "审核时间", sort = 5, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date handleTime;
    /**
     * 回复消息
     */
    private String msg;
    /**
     * 处理用户id
     */
    private Integer handleUserId;
    /**
     * 品牌id
     */
    private Integer accountId;
    /**
     * 备注
     */
    private String remark;
    /**
     * 认证类型名
     */
    @TableField(exist = false)
    @Excel(name = "认证类型", sort = 2)
    private String typeName;

    public void initTypeName(Map<Integer, String> nameMap) {
        typeName = nameMap.get(configId);
    }
}
